var GG_WORKPickupGridViewControllerBase = PickupGridViewControllerBase.extend({
construct: function(config) {
    if(!config)config={};
    if(!config.appctx)config.appctx='';
    if(!config.containerid)config.containerid='';
    arguments.callee.$.construct.call(this,this.getDefaultCfg(config));
    this.regCodeLists(config);
    this.regUICounters(config);
    this.regUIActions(config);
    this.regUpdatePanels(config);
    this.regControllers(config);
}
,regCodeLists:function(config)
{
     /*单位规模*/
     this.regCodeList(new IBizCodeList({id: 'liteTwo_CLGG_DWGM',datas:[{text:'小于50人',value:'49',realtext:'小于50人'},{text:'50-150人',value:'149',realtext:'50-150人'},{text:'150-500人',value:'499',realtext:'150-500人'},{text:'500-1000人',value:'999',realtext:'500-1000人'},{text:'1000-5000人',value:'4999',realtext:'1000-5000人'},{text:'5000-10000人',value:'9999',realtext:'5000-10000人'},{text:'10000人以上',value:'10001',realtext:'10000人以上'}]}));
     /*单位性质*/
     this.regCodeList(new IBizCodeList({id: 'liteTwo_CLGG_DWXZ',datas:[{text:'外资(欧美)',value:'外资(欧美)',realtext:'外资(欧美)'},{text:'外资(非欧美)',value:'外资(非欧美)',realtext:'外资(非欧美)'},{text:'合资',value:'合资',realtext:'合资'},{text:'国企',value:'国企',realtext:'国企'},{text:'民营公司',value:'民营公司',realtext:'民营公司'},{text:'上市公司',value:'上市公司',realtext:'上市公司'},{text:'创业公司',value:'创业公司',realtext:'创业公司'},{text:'外企代表处',value:'外企代表处',realtext:'外企代表处'},{text:'政府机关',value:'政府机关',realtext:'政府机关'},{text:'事业单位',value:'事业单位',realtext:'事业单位'},{text:'非营利机构',value:'非盈利机构',realtext:'非营利机构'}]}));
     /*工作类型*/
     this.regCodeList(new IBizCodeList({id: 'liteTwo_CLGG_GZLX',datas:[{text:'全职',value:'全职',realtext:'全职'},{text:'兼职',value:'兼职',realtext:'兼职'},{text:'实习',value:'实习',realtext:'实习'},{text:'全职/兼职',value:'全职/兼职',realtext:'全职/兼职'}]}));
}
,regUICounters:function(config)
{
}
,regUpdatePanels:function(config)
{
     var me=this;
}
,regControllers:function(config)
{
  var cid=config.containerid;
    if(cid!='')cid=cid+'_';
}
,regUIActions:function(config)
{
}
,onInit:function(){
   arguments.callee.$.onInit.call(this);
   var form=this.getSearchForm();
form.register(new IBizTextField({id:this.getCId2()+'M4',name:'n_gg_workname_like',form:form,width:100})
);
form.register(new IBizDropDownListField({id:this.getCId2()+'M5',name:'n_dwxz_eq',form:form,codelistid:'liteTwo_CLGG_DWXZ',width:100})
);
form.register(new IBizDropDownListField({id:this.getCId2()+'M6',name:'n_dwgm_eq',form:form,codelistid:'liteTwo_CLGG_DWGM',width:100})
);

}
,onSearchFormFieldChanged: function (fieldname, field, value) {
   var me=this;
   var form=me.getSearchForm();
}
,getDefaultCfg:function(cfg){
     var me=this;   
    var config={backendurl:cfg.appctx+'/Card/GG_WORKPickupGridView.do?'+'srfcid='+cfg.containerid+'&',loaddefault:true
                ,viewurl:'/card/gg_workpickupgridview.jsp?'+'srfcid='+cfg.containerid+'&'
               ,ctrls:{grid:{multiSelect:true
,enablePaging:true,pageSize:100,forceFit:false
,columns:[
{ "title" : $IGM('DEF.LNAME.GG_WORK.GG_WORKNAME','公司/单位名称'),"width":150,"data" :'gg_workname',"orderable":true}

,{ "title" : $IGM('DEF.LNAME.KSSJ','时间'),"width":150,"data" :'kssj',"orderable":true}

,{ "title" : $IGM('DEF.LNAME.JSSJ','到'),"width":150,"data" :'jssj',"orderable":true}

,{ "title" : $IGM('DEF.LNAME.DWGM','单位规模'),"width":150,"data" :'dwgm',"orderable":true,'render':function(data,type,row){return me.rendergrid_dwgm(data,type,row,me);}}

,{ "title" : $IGM('DEF.LNAME.DWXZ','单位性质'),"width":150,"data" :'dwxz',"orderable":true,'render':function(data,type,row){return me.rendergrid_dwxz(data,type,row,me);}}

,{ "title" : $IGM('DEF.LNAME.HY','行业'),"width":150,"data" :'hy',"orderable":true}

,{ "title" : $IGM('DEF.LNAME.GZLX','工作类型'),"width":150,"data" :'gzlx',"orderable":true,'render':function(data,type,row){return me.rendergrid_gzlx(data,type,row,me);}}

,{ "title" : $IGM('DEF.LNAME.ZW','职位'),"width":150,"data" :'zw',"orderable":true}

,{ "title" : $IGM('DEF.LNAME.ZN','职能'),"width":150,"data" :'zn',"orderable":true}

,{ "title" : $IGM('DEF.LNAME.BM','部门'),"width":150,"data" :'bm',"orderable":true}

,{ "title" : $IGM('DEF.LNAME.UPDATEMAN','更新人'),"width":150,"data" :'updateman',"orderable":true}

,{ "title" : $IGM('DEF.LNAME.UPDATEDATE','更新时间'),"width":150,"data" :'updatedate',"orderable":true}
]
},searchForm:{enableAdvanceSearch:false,dename:'GG_WORK'}}};
    return  $.extend({},config,cfg);
}
,doHideParentColumns: function (parentMode)
    {
        var me=this;
        arguments.callee.$.doHideParentColumns.call(this,parentMode);
 
         //关系类型 : DER1N ,主实体 :GG_CARD / 简历信息卡
         if (parentMode.srfparenttype=='DER1N' && parentMode.srfder1nid=='DER1N_GG_WORK_GG_CARD_CARDID')
         {
              return;
         }
}
    ,rendergrid_dwgm:function(data,type,row,me){
           return me.renderCodeList_Normal('liteTwo_CLGG_DWGM',data,'未定义');
    }
    ,rendergrid_dwxz:function(data,type,row,me){
           return me.renderCodeList_Normal('liteTwo_CLGG_DWXZ',data,'未定义');
    }
    ,rendergrid_gzlx:function(data,type,row,me){
           return me.renderCodeList_Normal('liteTwo_CLGG_GZLX',data,'未定义');
    }
});